class CreateRestaurants < ActiveRecord::Migration
  def self.up
    create_table :restaurants do |t|
      t.string :name, :null=>false
      t.string :telephone, :null=>false
      
      t.string :address
      
      t.timestamps
    end
    
    change_table :dishes do |t|
      t.references :restaurant
    end
  end

  def self.down
    change_table :dishes do |t|
      t.remove_references :restaurant
    end
    
    drop_table :restaurants
  end
end
